home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.0 KB | 67 lines | [TEXT/GEOL] |
- Item 9012352 28-Dec-89 15:13
-
- From: D1220 Vari-Lite, Andy Meldrum,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Look but don't touch..
-
- I have a CD ROM that has raster images on it. These images are rather large 8
- bit files (like try 15MB images of Washinton DC... ).
-
- I ran into a problem opening the file for display only from the CD ROM.
- ( Mac II,6.0.4, QD32, CDROM on Appleshare FileServer with the CDROM 2.0 Init )
- On attempting to open the file MAOpenFile would return an error. (-44
- actually). The error was returned on the call to PBHOpenDeny, & the result sort
- of makes sense. I get the feeling that the parameter block is filled in OK, so
- I have added an extra test for a locked volume. Have I got this right, since I
- don't see any other way of opening the file ???
-
- BEGIN { MAOpenFile }
- {always open data fork, to establish that the file does exist}
- WITH pb DO
- BEGIN
- ioNamePtr := @name;
- ioVRefnum := volRefnum;
- ioVersNum := 0;
- ioPermssn := dataPerm;
- ioMisc := NIL;
- END;
- TestForError(FillInDirID(@pb));
-
- IF (NOT qNeedsROM128K) & (NOT gConfiguration.hasHFS) THEN
- result := paramErr
- ELSE
- result := PBHOpenDeny(@pb, FALSE); { Try the shared volume open. }
-
- { get error -44, from CD ROM here... }
-
- (*
- Old Code ...
- IF result = paramErr THEN { Not on a shared volume, try HFS open. }
- *)
-
- (*
- New Code Starts
- *)
- IF ( result = paramErr ) OR (result = -44) THEN
- { Not on a shared volume or a write protected volume, try HFS open. }
- (*
- New Code Stops
- *)
-
- BEGIN
- pb.ioPermssn := BAND(dataPerm, 3);
- result := PBHOpen(@pb, FALSE);
- END;
- TestForError(result);
- { More of MAOpenFile follows this }
-
- Since I don't have a 15MB Mac right now this program raised the interesting
- question of how to spool an (arbitary non QD) image file on a Mac. I have a
- rather hacked up scheme at the moment & am wondering if anyone knows of a neat
- way to achieve this. Any suggestions gratefully recieved.
-
- Andy.
-
-